  function ValidateAsta() {
     // Variabili associate ai campi del form_add_asta
     var quantita = document.form_add_asta.quantita.value;
     var durata = document.form_add_asta.durata.value;
     var start_price = document.form_add_asta.start_price.value;
     var min_increment = document.form_add_asta.min_increment.value;
     var shipping_price = document.form_add_asta.shipping_price.value;
     var errorLog=document.getElementById("add_asta_error_log");
     
        if((quantita== "")||(isNaN(quantita)) ||(parseInt(quantita)<=0)) {
           errorLog.innerHTML='Quantity must be an integer more than 0.';
           document.form_add_asta.quantita.focus();
           return false;
        }
        else if((durata== "")||(isNaN(durata)) ||(parseInt(durata)<=0 )){
           errorLog.innerHTML='Durata must be an integer more than 0.';
           document.form_add_asta.durata.focus();
           return false;
        }        else if((start_price== "")||(isNaN(start_price)) ||(parseFloat(start_price)<=0)) {
           errorLog.innerHTML='Start price must be more than 0.';
           document.form_add_asta.start_price.focus();
           return false;
        }
        else if((min_increment== "")||(isNaN(min_increment)) ||(parseFloat(min_increment)<=0 )){
           errorLog.innerHTML='Min increment must be more than 0.';
           document.form_add_asta.min_increment.focus();
           return false;
        }
        else if((shipping_price== "")||(isNaN(shipping_price)) ||(parseFloat(shipping_price)<0) ){
           errorLog.innerHTML='Shipping price must be positive.';
           document.form_add_asta.shipping_price.focus();
           return false;
        }
        else {
           document.form_add_asta.submit();
        }
  }
